// heap_overwrite.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main (void)
{
char *p, *q;
p = malloc(16);
q = malloc(16);
strcpy(p, "hello my world! hello zhaixue.cc!\n");
printf("%s\n", p);
printf("%s\n", q);
while (1);// never free if process running
free(q);
free(p);
return 0;
}
